/*
 * Copyright@www.it1997.com.
 * @Author: 陈晓晨
 * @Date: 2020/6/4
 * Description:版权所有 QQ:376231445
 */

package com.it1997.it1997admin.mapper;

import com.it1997.it1997admin.pojo.Permission;
import com.it1997.it1997admin.vo.PermissionVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.util.List;
@Mapper
public interface PermissionMapper {
    List<Permission> getPermissionList(Integer roleId);

    List<Permission> getChildPermissions(@Param("pid") Integer pid, @Param("roleId") Integer roleId);

    List<PermissionVo> getAllChildPermissions(@Param("pid") Integer pid);

    int addPermission(@Param("permissionId") String permissionId,@Param("roleId") int roleId);
    //设置权限状态可用
    int updatePermissionStatus(@Param("permissionId") String permissionId,@Param("roleId") int roleId);
    //根据角色id查询权限id
    List<Integer> getPermissionId(@Param("roleId") Integer roleId);
}
